<?php
    #-------------------------------------------------------------#
	# This file is part of the Kumomado - Virtual Window Platform #
	# for PHP. (c) 2009 Tsai, Min Che <tirme0812@gmail.com>       #
	# Please visit http://www.kumomado.org/ for more information. #
	#                                                             #
	# This software is licensed under the GNU License v3. Please  #
	# view the LICENSE file for the full text of this license.    #
    #-------------------------------------------------------------#

	Kumomado::load('Kui.KumomadoUserInterface');
	/**
	 * @package libraries/kui/
	 * @author Tsai, Min Che
	 * @version 1.0
	 * @abstract
	 */
	abstract class KumomadoAbstractContainer implements KumomadoUserInterface {
		/**
		 * @var boolean
		 */
		protected $is_collecten = true;
		/**
		 * @var string
		 */
		protected $id;
		/**
		 * @var object @link KumomadoUIClient
		 */
		protected $KuiClient = null;
		/**
		 * Construct
		 */
		public function __construct() {
			$this->KuiClient = KumomadoUIClient::getInstance();
		}
		/**
		 * @param string $id
		 */
		protected function setId($id) {
			$this->id = str_replace(' ', '', $id);
		}
		/**
		 * @return string
		 */
		public function getId() {
			return $this->id;
		}
		/**
		 * @abstract
		 * @param object $kui @link KumomadoUserInterface
		 */
		abstract public function add(KumomadoUserInterface $kui);
		/**
		 * @abstract
		 * @return string Html code
		 */
		abstract protected function view();
		/**
		 * @abstract
		 * @return array
		 */
		abstract public function render();
		/**
		 * @param boolean $is_collecten
		 */
		public function setCollecten($is_collecten) {
			$this->is_collection = true === $is_collection;
		}
		/**
		 * @return boolean
		 */
		public function isCollecten() {
			return $this->is_collecten;
		}
	}
?>